#ifndef _OH_POLICY_NAVIGATION_H
#define _OH_POLICY_NAVIGATION_H

#include <oh/base.h>

_OH_BEGIN
_OH_POLICY_BEGIN

namespace navigation{

// Forward Iteration Policy
template<typename Target>
class Forward
{
public:
    static Target const& Next(Target const& a_Target)
    {
        return a_Target.next();
    }

// Service stuff
protected:
    Forward( );
};

template<typename Target>
class Backward
{
public:
    static Target const& Prev(Target const& a_Target)
    {
        return a_Target.prev();
    }

// Service stuff
protected:
    Backward( );
};

// Bidirectional Iteration Policy
template<typename Target>
class Bidirectional
    :public Forward<Target>
    ,public Backward<Target>
{
// Service stuff
protected:
    Bidirectional( );
};
// SHIT HERE
// Random Access Iteration
template
<
    typename Target
>
class RandomAccess
    :public Bidirectional<Target>
{
public:
    typedef typename Target::difference difference;

    static Target const& Offset(Target const& a_Target, difference const a_Offset)
    {
        return a_Target+a_Offset;
    }

    static difference const Diff (Target const& a_Left, Target const& a_Right)
    {
        return (a_Left - a_Right);
    }

// Service stuff
protected:
    RandomAccess()
    {}
};

// Reverse Forward Iteration Policy
template<typename Target>
class Reverse_Forward
{
public:
    static Target const& Next(Target const& a_Target)
    {
        return a_Target.prev();
    }

// Service stuff
protected:
    Reverse_Forward( );
};

template<typename Target>
class Reverse_Backward
{
public:
    static Target const& Prev(Target const& a_Target)
    {
        return a_Target.next();
    }

// Service stuff
protected:
    Reverse_Backward( );
};

// Reverse Bidirectional Iteration Policy
template<typename Target>
class Reverse_Bidirectional
    :public Reverse_Forward<Target>
    ,public Reverse_Backward<Target>
{
// Service stuff
protected:
    Reverse_Bidirectional( );
};

} // Navigation

_OH_POLICY_END
_OH_END

#endif // _OH_POLICY_NAVIGATION_H